package com.lepai.component;

import org.springframework.context.annotation.Bean;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

/**
 * @author weihaolong
 * @date 2018-11-20 10:25
 * @description
 */
@Component
public class RestFulComponent {

    @Bean
    public RestTemplate defaultRestTemplate(){
        return new RestTemplate(new HttpComponentsClientHttpRequestFactory());
    }
}
